package model.objects;

import java.awt.*;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.List;

/**
 * an entry in a image.cfg file
 *
 * @author Zach Michaelov
 */
public class GameImage {
    // the Image's identifier, specified in the config file
    private String tag;
    // the filenames and the images they correspond to
    private Map<String, Image> map;


    public GameImage(String tag, NamedImage... images) {
        this.tag = tag;
        this.map = new HashMap<String, Image>();
        for (NamedImage image : images) {
            map.put(image.getFilename(), image.getImage());
        }
    }

    public String getTag() {
        return tag;
    }

    public Collection<Image> getImages() {
        return map.values();
    }


    public Image getImageByFilename(String filename) {
        return map.get(filename);
    }

}
